public class ArrayMax {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5, 6, 7, 6, 5, 34, 6, 8, 9, 4};
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            // 三言运算符
            max = max < arr[i] ? arr[i] : max;
        }
        System.out.println(max);
    }
}